# 迭代

# d = {'a': 1, 'b': 2, 'c': 3}

# key 迭代
# for key in d:
#     print(key)

# value 迭代
# for value in d.values():
#     print(value)

# kv 迭代
# for k, v in d.items():
#     print(k,':',v)

from collections.abc import Iterable

# print(isinstance('abc', Iterable))
# print(isinstance([1,2,3], Iterable))
# print(isinstance(123, Iterable))

# for x, y in [(1, 1), (2, 4), (3, 9)]:
#     print(x, y)


def findMinAndMax(L):
    min = L[0]
    max = L[0]

    for v in L:
        if v < min:
            min = v
        if v > max:
            max = v

    return (min, max)


print(findMinAndMax([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))
